1. Field of the Invention
This invention relates to the field of concurrent message processing. In particular, it relates to concurrent message processing of asynchronous messages at an intermediary.
2. Description of the Related Art
A common requirement of asynchronous message queuing systems is for the order of messages sent to any queue to be maintained. This means that a first message sent before a second message must be received by the consumer in that order.
The enforcement of message ordering has many implications for the processing of messages. One of these relates to the processing of messages by an intermediary.
Intermediaries may process messages in various different ways by performing logic between the senders and the receivers of messages. An example intermediary is a message broker that translates a message from the formal messaging protocol of the sender to the formal messaging protocol of the receiver in a telecommunication network where programs communicate by exchanging formally-defined messages.
An example message broker is IBM's WebSphere Message Broker (IBM and WebSphere are trademarks of International Business Machines Corporation) which allows data and information in the form of messages to flow between disparate applications across multiple hardware and software platforms. Rules can be applied to the data flowing through the message broker to route, store, retrieve, and transform the information.
Another example of an intermediary is a mediation framework such as the Service Integration Bus (Sibus) in IBM WebSphere Application Server messaging.
A known solution to the problem of maintaining message order when being processed by an intermediary is to limit what the intermediary is permitted to do. For example, such intermediary limitation may be to remove the intermediary's ability to send additional messages or to delete messages in the flow. In another example, the fields in the message on which the intermediary can perform may be limited. In this case, the simplest solution is to mark the messages with a sequence number and to have the client reorder the messages in the correct sequence on receive. This can be done by the API layer so that it is transparent to the receiving application.
Another solution to the problem is to prevent the intermediary from processing more than a single message at a time. However, this obvious solution results in considerable overheads. If a message ordering requirement does not exist, the intermediary processing entity is allowed to process multiple messages simultaneously, resulting in a much higher throughput of messaging.
US 2003/208489 discloses a system and method of running multiple operations in a resource manager in parallel and sorting out conflicts when they occur. This is done inside a single transaction and ensuring that the parallel operations are executed such that the result is the same as if the operations were serially executed. This involves rerunning operations in the correct order when a conflict occurs.